<?php
/////////////////////////////////////////////////////////
// BASIC SETTINGS
// SET ECHONEST API KEYS, MYSQL CONNECTION DETAILS
/////////////////////////////////////////////////////////

$apikey = ";
$consumer_key = "";
$consumer_secret = ";
$sandbox_key = "emi_open_collection";
$username="taguser";
$password="AwZ98g";
$database="tags2";
mysql_connect('localhost',$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
// END


require_once dirname(__FILE__).'/lib/EchoNest/Autoloader.php';
EchoNest_Autoloader::register();
$echonest = new EchoNest_Client();
$echonest->authenticate($apikey);
$sandboxApi = $echonest->getSandboxApi()->setOAuthConfig(array("consumer_key" => $consumer_key,"consumer_secret" => $consumer_secret))->setSandbox($sandbox_key);



// Remember to run sandbox_cache.php before you do anything. It basically
// links sandbox ID's to EchoNest ID's so you can use the API more efficiently
// Once you've cached the sandbox you can access sandbox asset ID's from MYSQL
// rather than the echonest API.

?>